<template>
	<view class="openVip">
		<u-popup :show="openVip" mode="center" bgColor='transparent'>
			<view class="popbg">
				<image src="../../static/popbg.png" mode="" class="bgPng"></image>
				<view class="textArea">
					<view class="big">您还暂未开通会员</view>
					<view class="small">低至0.01元每天，畅享无限</view>
					<view class="small">对话，不限制次数</view>
					<view class="open" @click="toVip">立即开通</view>
				</view>
			</view>
			<view class="center">
				<u-icon name="close" color="#ffffff" size="42" @click="closeVip"></u-icon>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name:"openVip",
		data() {
			return {
			};
		},
		computed: {
			openVip: {
				get() {
					return this.$store.state.openVip
				},
				set(val) {
					this.$store.state.openVip = val;
				}
			}
		},
		methods: {
			closeVip() {
				this.openVip = false;
			},
			toVip() {
				this.openVip = false;
				uni.navigateTo({
					url: '/pages/vip/vip'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.openVip {
		.popbg {
			text-align: center;
			position: relative;
			.bgPng {
				width: 490rpx;
				height: 634rpx;
			}
			.textArea {
				position: absolute;
				width: 100%;
				height: 100%;
				left: 0;
				top: 0;
				.big {
					padding-top: 154rpx;
					font-size: 50rpx;
					color: #fff;
					margin-bottom: 38px;
					line-height: 1;
					text-shadow: 0px 3px 8px #0DA760;
					letter-spacing: 2px;
					white-space: nowrap;
				}
				.small {
					font-size: 34rpx;
					color: #fff;
					line-height: 1;
					margin-bottom: 20rpx;
				}
				.open {
					width: 290rpx;
					$h: 93rpx;
					height: $h;
					line-height: $h;
					border-radius: math.div($h,2);
					background-color: #fff;
					color: #27BD5C;
					font-size: 48rpx;
					text-align: center;
					margin: 90rpx auto 0;
				}
			}
		}
		.center {
			text-align: center;
			display: flex;
			justify-content: center;
		}
	}
</style>